use structured binding instead of std::tie.
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 20 Nov 2022 07:33:12 +0000 (00:33 -0700)
committertsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 20 Nov 2022 07:33:12 +0000 (00:33 -0700)
kml.cc

diff --git a/kml.cc b/kml.cc
index 43a23006810d8b5a31067698a9153ffd302ef5e6..0dd315c3f5b70b0b4beac71e8ffab9f6b70e9518 100644 (file)
--- a/kml.cc
+++ b/kml.cc
@@ -26,7 +26,7 @@
 #include <cstdlib>                      // for strtod
 #include <cstring>                      // for strcmp
 #include <optional>                     // for optional
-#include <tuple>                        // for tuple, make_tuple, tie
+#include <tuple>                        // for tuple, make_tuple
 
 #include <QByteArray>                   // for QByteArray
 #include <QChar>                        // for QChar
@@ -280,9 +280,7 @@ void KmlFormat::gx_trk_e(xg_string /*args*/, const QXmlStreamAttributes* /*attrs
   while (!gx_trk_times->isEmpty()) {
     auto* trkpt = new Waypoint;
     trkpt->SetCreationTime(gx_trk_times->takeFirst());
-    double lat, lon, alt;
-    int n;
-    std::tie(n, lat, lon, alt) = gx_trk_coords->takeFirst();
+    auto [n, lat, lon, alt] = gx_trk_coords->takeFirst();
     // An empty kml:coord element is permitted to indicate missing position data;
     // the estimated position may be determined using some interpolation method.
     // However if we get one we will throw away the time as we don't have a location.